/**
 * 
 */
package com.gr.staffpm.dhtmlx.datatypes;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.thoughtworks.xstream.annotations.XStreamOmitField;


/**
 * @author Graham Rhodes 21 Jan 2011 11:40:44
 */
public class Project implements Serializable {

    private static final long serialVersionUID = 1L;
    private int id = 0;
    private String name = "";
    private String startdate = "";
    private List<Task> tasks = new ArrayList<Task>();
    @XStreamOmitField
    private final transient SimpleDateFormat df = new SimpleDateFormat("yyyy,MM,dd");

    public Project() {

    }


    public int getId() {
        return id;
    }


    public String getName() {
        return name;
    }


    public String getStartdate() {
        return startdate;
    }


    public List<Task> getTasks() {
        return tasks;
    }


    public void setId(int id) {
        this.id = id;
    }


    public void setName(String name) {
        this.name = name;
    }


    public void setStartdate(String startdate) {
        this.startdate = startdate;
    }

    public void setStartdate(Date startdate) {
        this.startdate = df.format(startdate);
    }

    public void addTask(Task task) {
        this.tasks.add(task);
    }

    public void setTask(List<Task> tasks) {
        this.tasks = tasks;
    }

}
